
// 管理项目用户相关接口
import service from "./service";
// 用户相关请求地址
const API = {
  GET_CART_URL: '/cart',
  DELETE_URL: '/cart',
  COUNT_URL: '/cart/count',
  ADD_ITEM: '/cart/add'
}
let userId = localStorage.getItem("userId")

export const getCart = () => service.get(API.GET_CART_URL + `/${userId}`)
export const deleteCart = (data) => service.post(API.DELETE_URL, data)
export const getCartCountApi = () => service.get(API.COUNT_URL + `/${userId}`)
export const addItemApi = (data) => service.post(API.ADD_ITEM, data)